/*
* @ author madman 
* @ use 数据库连接
*/
const mongoose = require('mongoose');
const config = require('../../config/config');
const dbConfig = config[process.env.NODE_ENV || 'development'];
mongoose.connect(dbConfig.mongo.uri, {useNewUrlParser: true}).then(
  () => {
    console.log('Mongoose connection open to ' + dbConfig.mongo.uri);
  },
  err => {
    console.log('Mongoose connection error: ' + err);
  }
);

